package model.minimax;

import model.Slot;

/**
 * This class returns the source and target node for each edge in the tree as it gets expanded.
 *
 */
public class MoveEdge
{
    /**
     * The slot at which the next Piece should be inserted to get from the sourceNode state
     * to the targetNode state.
     */
    private Slot move;

    /**
     * This edge's source node
     */
    private StateNode sourceNode;
    
    /**
     * This edge's target node
     */
    private StateNode targetNode;

    public MoveEdge(Slot move, StateNode sourceNode)
    {
        super();
        this.move = move;
        this.sourceNode = sourceNode;
    }

    /**
     * Returns the slot at which the next Piece should be inserted to get from the sourceNode state
     * to the targetNode state.
     * 
     * @return
     */
    public Slot getMove()
    {
        return move;
    }

    public StateNode getSourceNode()
    {
        return sourceNode;
    }

    public void setTargetNode(StateNode targetNode)
    {
        this.targetNode = targetNode;
    }

    public StateNode getTargetNode()
    {
        return targetNode;
    }
}
